package com.yida.wy.common.domain.request;

import com.yida.wy.common.valid.Update;
import com.yida.wy.common.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 基础数据（房屋信息）新增或修改DTO
 *
 * @author lqq
 */
@Data
@ApiModel(value = "基础数据（房屋信息）新增或修改DTO")
public class WyBaseHouseAddUpdateRequest extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value= "房牌号")
    @NotBlank(message = "房牌号不能为空")
    private String roomNum;

    @ApiModelProperty(value= "建筑面积")
    @NotNull(message = "建筑面积不能为空")
    private BigDecimal actualSize;

    @ApiModelProperty(value= "套内面积")
    @NotNull(message = "套内面积不能为空")
    private BigDecimal insideSize;

    @ApiModelProperty(value= "房屋详细地址")
    @NotBlank(message = "房屋详细地址不能为空")
    private String houseLocation;

    @ApiModelProperty(value = "房屋ID")
    @NotNull(groups = Update.class, message = "请求参数有误[houseId]为空")
    private Long houseId;

    @ApiModelProperty(value = "自然幢标识码")
    @NotNull(message = "请求参数有误[buildCode]为空")
    private String buildCode;

    @ApiModelProperty(value = "房屋标识码")
    private String houseCode;

    @ApiModelProperty(value = "地区ID")
    @NotNull(message = "请求参数有误[areaId]为空")
    private Long areaId;

    @ApiModelProperty(value = "街道ID")
    @NotNull(message = "请求参数有误[streetId]为空")
    private Long streetId;
}
